package com.ruyiadmin.springboot.entity_data_model.entity_model.system_model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.ruyiadmin.springboot.common_infrastructure.models.base_entity_model.RuYiAdminBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 计划任务模型
 * </p>
 *
 * @author RuYiAdmin
 * @since 2022-07-12
 */
@Data
@TableName("sys_schedule_job")
@ApiModel(value = "SysScheduleJob对象", description = "计划任务表")
@NoArgsConstructor
@AllArgsConstructor
public class SysScheduleJob extends RuYiAdminBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("任务名称")
    @TableField("JOB_NAME")
    @NotNull
    @Length(max = 128)
    private String jobName;

    @ApiModelProperty("任务描述")
    @TableField("JOB_DESCRIPTION")
    @Length(max = 512)
    private String jobDescription;

    @ApiModelProperty("命名空间")
    @TableField("NAMESPACE")
    @NotNull
    @Length(max = 512)
    private String namespace;

    @ApiModelProperty("实现类")
    @TableField("JOB_IMPLEMENT")
    @NotNull
    @Length(max = 128)
    private String jobImplement;

    @ApiModelProperty("Cron表达式")
    @TableField("CRON_EXPRESSION")
    @NotNull
    @Length(max = 128)
    private String cronExpression;

    @ApiModelProperty("开始时间")
    @TableField("START_TIME")
    private Date startTime;

    @ApiModelProperty("结束时间")
    @TableField("END_TIME")
    private Date endTime;

    @ApiModelProperty("任务状态，0：已启用，1：运行中，2：执行中，3：执行完成，4：任务计划中，5：已停止")
    @TableField("JOB_STATUS")
    //@NotNull
    private Integer jobStatus;

    @ApiModelProperty("集群编号")
    @TableField("GROUP_ID")
    private Integer groupId;

    @ApiModelProperty("序号")
    @TableField("SERIAL_NUMBER")
    private Integer serialNumber;

}
